LEADTOOLS (Leadtools assembly)

SetLicense(Byte[],String) Method

Show in webframe
Example 







Byte array containing the LEADTOOLS runtime license to load.
Character string containing the developer key.
Sets the runtime license for LEADTOOLS and unlocks support for optional features such as LEADTOOLS Imaging Pro, Document and Medical capabilities, or PDF support.
Syntax
public static void SetLicense( 
   byte[] licenseBuffer,
   string developerKey
)
'Declaration
 
Public Overloads Shared Sub SetLicense( _
   ByVal licenseBuffer() As Byte, _
   ByVal developerKey As String _
) 
'Usage
 
Dim licenseBuffer() As Byte
Dim developerKey As String
 
RasterSupport.SetLicense(licenseBuffer, developerKey)
public static void SetLicense( 
   byte[] licenseBuffer,
   string developerKey
)
+(BOOL)setLicenseBuffer:(const unsigned char*)licenseBuffer 
                 length:(size_t)length 
           developerKey:(NSString*)developerKey 
                  error:(NSError**)outError;
            

            
 function Leadtools.RasterSupport.SetLicense(Byte[],String)( 
   licenseBuffer ,
   developerKey 
)
public:
static void SetLicense( 
   array<byte>^ licenseBuffer,
   String^ developerKey
) 

Parameters

licenseBuffer
Byte array containing the LEADTOOLS runtime license to load.
developerKey
Character string containing the developer key.
Remarks

You must use this function to set the runtime license for LEADTOOLS and to unlock support for any optional features that you have licensed. If you do not set a runtime license, your application will display a "nag" message dialog at runtime, indicating that you have developed the application without a valid runtime license.

In order to obtain a runtime license and developer key, you must contact LEAD. For more information, refer to About LEADTOOLS Runtime Licenses.

For information about LEADTOOLS Document/Medical capabilities, contact LEAD.

To determine if support for optional features has been unlocked, use IsLocked

To set the runtime license from a disk file instead of memory buffer, use SetLicense(string licenseFile, string developerKey).

NOTE: As an alternative to calling RasterSupport.SetLicense, you can specify your runtime license in the Leadtools.dll.config file. For more information, see LEADTOOLS Config License.

Example
Copy Code  
Imports Leadtools
Imports Leadtools.Codecs
Imports Leadtools.ImageProcessing

Dim MY_LICENSE_FILE As String = "d:\temp\TestLic.lic"
Dim MY_DEVELOPER_KEY As String = "xyz123abc"
Public Sub SetLicenseFileExample()
   Dim license As Byte()
   license = System.IO.File.ReadAllBytes(MY_LICENSE_FILE)
   RasterSupport.SetLicense(license, MY_DEVELOPER_KEY)
   Dim isLocked As Boolean = RasterSupport.IsLocked(RasterSupportType.Document)
   If (isLocked) Then
      Console.WriteLine("Document support is locked")
   Else
      Console.WriteLine("Document support is unlocked")
   End If
End Sub
using Leadtools;
using Leadtools.Codecs;
using Leadtools.ImageProcessing;

string MY_LICENSE_FILE = "d:\\temp\\TestLic.lic";
string MY_DEVELOPER_KEY = "xyz123abc";
      
public void SetLicenseByteArrayExample()
{
   byte[] license = System.IO.File.ReadAllBytes(MY_LICENSE_FILE);
   RasterSupport.SetLicense(license, MY_DEVELOPER_KEY);
   bool isLocked = RasterSupport.IsLocked(RasterSupportType.Document);
   if (isLocked)
      Console.WriteLine("Document support is locked");
   else
      Console.WriteLine("Document support is unlocked");
}
Requirements

Target Platforms

See Also

Reference

RasterSupport Class
RasterSupport Members
Overload List
Activating Server Licenses

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.